package cn.madis.ymcc;


import cn.madis.ymcc.fallback.MediaFeignClientFallbackFactory;
import cn.madis.ymcc.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(value = "service-media",fallbackFactory = MediaFeignClientFallbackFactory.class)
public interface MediaFeignClient {
    /**
     *
     * 根据课程courseId获取到Media对象
     */

    @RequestMapping(value = "/mediaFile/media/{courseId}",method = RequestMethod.GET)
    JSONResult getMedia(@PathVariable("courseId")Long courseId);
}
